AVIF (.avif)
Background & Context

-
- MIME type: image/avif
- AVIF raster image and compression format.
- Commonly used for storing still or animated images.
- AVIF is an acronym for AV1 Image File Format.
- Binary format.
- Supports RGB color space.
- Supports up to 12 bits per color channel.
- AVIF support is available in all major web browsers.
- Developed by Alliance for Open Media.
Import & Export

- Import["file.avif"] imports an AVIF file, returning a single Image object or a list of images.
- Import["file.avif",elem] imports the specified element from an AVIF file.
- The import format can be specified with Import["file","AVIF"] or Import["file",{"AVIF",elem,…}].
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements



- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"AnimatedImage" animated AVIF represented as an AnimatedImage object "Data" array of pixel values "Graphics" raster image, given as a Graphics object "Image" raster image, given as an Image object "Thumbnail" small thumbnail version of the image {"Thumbnail",size} thumbnail using the specified size - For multiframe AVIF files, the following elements can access different frames and their properties:
-
"GraphicsList" a list of graphics "ImageCount" number of stored frames "ImageList" a list of images "ThumbnailList" a list of thumbnail images - Import by default uses the "Image" element for a static AVIF and "ImageList" for an animated AVIF.
- Advanced Import elements:
-
"BitDepth" bits used to represent each color channel in the file "CameraTopOrientation" orientation of the camera when the picture was taken "Channels" - the number of color channels used in the file
"ColorProfileData" embedded color profile, given as a ColorProfileData object "ColorSpace" color encoding used in the file "FlashUsed" - whether the flash was fired
"GeoPosition" latitude and longitude represented as a GeoPosition object "GPSDateTime" - image creation date and time registered by GPS
"ImageKeyframeInfo" keyframe information "RasterSize" raster dimensions "RedEyeCorrection" whether a red-eye correction was performed "Summary" - summary of the file
"SummarySlideView" slide view summary of all frames - Metadata elements:
-
"Exif" formatted Exif (Exchange image file format) "XMP" formatted XMP (Extensible metadata platform) "MetaInformation" combination of all formatted metadata present in the file - Raw metadata, as stored in the file, can be imported using "RawExif" and "RawXMP", which is returned as an association.
- All Exif and XMP tags can be imported individually. Common tags include:
-
"ApertureValue" lens aperture "DateTime" image creation date and time "ExposureTime" exposure time, given in seconds "FlashInfo" - flash information: flash fired, red-eye correction, etc.
"FNumber" F number "FocalLength" actual focal length of the lens, given in millimeters "GPSAltitude" altitude of the GPS position "GPSLatitude" latitude of the GPS position "GPSLongitude" longitude of the GPS position
Examples
open all close allScope (3)
Import Elements (33)
Available Elements (2)
Data Representation (9)
"AnimatedImage" (1)
Import the image sequence as an AnimatedImage:
"Graphics" (1)
Import as a Graphics object:
"GraphicsList" (1)
Import the data as a list of Graphics objects:
"Image" (1)
"ImageList" (2)
Import the data as a list of Image objects:
Metadata (22)
"ColorProfileData" (1)
Get the embedded color profile, given as a ColorProfileData object:
The color profile is stored in the ColorSpace option of the imported image:
"ColorSpace" (1)
Get the color encoding used on export:
Use ImageColorSpace to get the color space of an imported image:
"Exif" (3)
"ImageKeyframeInfo" (2)
"RasterSize" (2)
Get the dimensions of the image stored in the file:
Using ImageDimensions on an imported image gives the same result:
Specify the raster size of the imported image with the RasterSize option:
"RawExif" (1)
"RawXMP" (1)
Import Options (4)
"ImageTopOrientation" (1)
IncludeMetaInformation (2)
Tech Notes
Related Guides
History
Introduced in 2025 (14.3)